// Copyright @ ChenChao

#pragma once

#include "CoreMinimal.h"
#include "Characters/WarriorBaseCharacter.h"
#include "WarriorHeroCharacter.generated.h"

struct FInputActionValue;
class UWarriorDataAssetInputConfig;
class USpringArmComponent;
class UCameraComponent;

/**
 * 
 */
UCLASS()
class WARRIOR_API AWarriorHeroCharacter : public AWarriorBaseCharacter
{
	GENERATED_BODY()

public:
	AWarriorHeroCharacter();
	
protected:
	//~Begin Apawn Interface.
	virtual void PossessedBy(AController* NewController) override;	//当Controller（玩家或AI）获得该Pawn控制权时触发
	//~ End APawn Interface
	
	//设置玩家输入组件
	virtual void SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) override;

	virtual void BeginPlay() override;

private:
#pragma region Components
	//弹簧臂组件
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Camera", meta = (AllowPrivateAccess = "true"))
	USpringArmComponent* CameraBoom;
	
	//跟随相机组件
	UPROPERTY(VisibleAnywhere,BlueprintReadonly,Category ="Camera",meta   =(AlLowPrivateAccess   ="true"))
	UCameraComponent*   FollowCamera;	
	
#pragma endregion

#pragma region Inputs
	
	//数据资产-输入配置
	UPROPERTY(EditDefaultsOnly,BlueprintReadonly,Category ="CharacterData",meta   =(AlLowPrivateAccess   ="true"))
	UWarriorDataAssetInputConfig* DataAssetInputConfig;

	//回调函数: 移动输入
	void Input_Move(const FInputActionValue& InputActionValue);
	
	//回调函数: 视角输入
	void Input_Look(const FInputActionValue& InputActionValue);
	
#pragma endregion
	
};
